<?php echo form_fieldset('Personas');?>
<table border=0 align="center">        
<?php
echo form_hidden(array('name'=>'base_url','id' => 'base_url','value' =>base_url()));
echo form_open('personas_controller/guardar_personas',$attributes= array('name' => "formPersonas"));
            
?> 
    <tr>
		<td><?php echo form_label('C&eacute;dula', 'lbl_cedula');?></td>	
		<td><?php echo form_input('cedula',set_value('cedula')) ?></td>
		<td><?php echo form_error('cedula', '<div class="error">', '</div>'); ?></td>
		
	</tr>
	<tr>
		<td><?php echo form_label('Nombres', 'lbl_nombres');?></td>	
		<td><?php echo form_input('primer_nombre',set_value('primer_nombre')) ?></td>
		<td><?php echo form_error('nombres', '<div class="error">', '</div>'); ?></td>
	</tr>
	<tr>
		<td><?php echo form_label('Apellidos', 'lbl_apellidos');?></td>	
		<td><?php echo form_input('primer_apellido',set_value('primer_apellido')) ?></td>
		<td><?php echo form_error('apellidos', '<div class="error">', '</div>'); ?></td>
	</tr>
	<tr>
		<td><?php echo form_label('Tel&eacute;fono', 'lbl_telefono');?></td>	
		<td><?php echo form_input('telefono',set_value('telefono')) ?></td>
		<td><?php echo form_error('telefono', '<div class="error">', '</div>'); ?></td>
	</tr>
	<tr>
		<td><?php echo form_label('Celular', 'lbl_celular');?></td>	
		<td><?php echo form_input('celular',set_value('celular')) ?></td>
		<td><?php echo form_error('celular', '<div class="error">', '</div>'); ?></td>
	</tr>
	<tr>
		<td><?php echo form_label('Fecha:', 'lbl_fecha');?></td>	
		<td><?php echo form_input(array('name' =>'fecha','size' => '10','class' => 'input','readOnly'=>'true','id'=>'fecha')) ?>
		 <?php $img = img(array('src'=>'/imagenes/boton_date.png', 'valign'=>'middle' ));?>		
		<?php echo anchor('', $img,array('id'=>'calendario')); ?>
		<td><?php echo form_error('fecha', '<div class="error">', '</div>'); ?></td>
	</tr>
	<tr>
		<td><?php echo form_label('Email', 'lbl_email');?></td>	
		<td><?php echo form_input('email',set_value('email')) ?></td>
		<td><?php echo form_error('email', '<div class="error">', '</div>'); ?></td>
	</tr>
	<tr>
    	<td colspan="2" align="right"><?php echo form_submit(array('name'=> 'btn_guardar','value'=>'Guardar','class'=>'Boton')) ?>
	   	<?php echo form_reset(array('name'=> 'btn_cancelar','value'=>'Cancelar','class'=>'Boton'))?></td>
       
	</tr>
	<script type="text/javascript">
  			function dateChanged(calendar) {
    			if (calendar.dateClicked) {
      			var y = calendar.date.getFullYear();
      			var m = calendar.date.getMonth();
      			var d = calendar.date.getDate();
      			window.location = "#";
    			}
  			};  
  
  			Calendar.setup(
    			{
      				inputField  : "fecha",
      				ifFormat    : "%d/%m/%Y",
      				button      : "calendario"
    			}
  			);
  
		</script>
 		<?php echo  form_close();?>
</table>
<div class="content">
		<h1>Listado de Personas</h1>
		<div class="paging"><?php echo $pagination; ?></div>
		<div class="data"><?php echo $table; ?></div>
		<br />
		
	</div>
